﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Deeper.Common;
namespace Deeper.DataAccess
{
    public interface IClip
    {
        string ToString();

    }
    public static class ClipHelper
    {
        public static IClip BothClip(this IClip defaultClip, IClip leftWhere, IClip rightWhere)
        {
            if (leftWhere.IsNull() && rightWhere.IsNull())
            {
                return defaultClip;
            }
            if (leftWhere.IsNull())
            {
                return rightWhere;
            }
            if (rightWhere.IsNull())
            {
                return leftWhere;
            }
            return null;
        }
    }
}
